package com.qdlc.p2p.biz.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.service.NoticeTypeService;
import com.qdlc.p2p.dal.common.model.jpa.PageDataList;
import com.qdlc.p2p.dal.dao.NoticeTypeDao;
import com.qdlc.p2p.dal.dto.NoticeType;

@Service("noticeTypeService")
public class NoticeTypeServiceImpl implements NoticeTypeService {

    @Resource
    private NoticeTypeDao noticeTypeDao;

    @Override
    public void update(NoticeType noticeType) {
        noticeTypeDao.update(noticeType);
    }

    @Override
    public List<NoticeType> list() {
        return noticeTypeDao.list();
    }

    @Override
    public PageDataList<NoticeType> list(int page, int rows, NoticeType noticeType) {
        return noticeTypeDao.list(page, rows, noticeType);
    }

    @Override
    public NoticeType findById(long id) {
        return noticeTypeDao.find(id);
    }

    @Override
    public void add(NoticeType noticeType) {
        noticeTypeDao.save(noticeType);
    }

}
